package com.imti.mall.order.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.imti.mall.model.order.pojo.OmsOrderReturnReason;
import com.imti.mall.model.order.query.ReturnResonApplyQuery;
import com.imti.mall.order.mapper.OmsOrderReturnReasonMapper;
import com.imti.mall.order.service.OmsOrderReturnReasonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OmsOrderReturnReasonServiceImpl  extends ServiceImpl<OmsOrderReturnReasonMapper, OmsOrderReturnReason> implements OmsOrderReturnReasonService {

  @Autowired
  private OmsOrderReturnReasonMapper omsOrderReturnReasonMapper;

  @Override
  public List<OmsOrderReturnReason> findOmsOrderReturnReason(ReturnResonApplyQuery returnResonApplyQuery, Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum, pageSize);
    return omsOrderReturnReasonMapper.getList(returnResonApplyQuery);
  }

  @Override
  public int updateStatusById(OmsOrderReturnReason omsOrderReturnReason) {
    return omsOrderReturnReasonMapper.updateStatusById(omsOrderReturnReason);
  }

}
